<template>
  <div>
    <el-button @click="addBook">add</el-button>
    <el-button @click="lookBook">look</el-button>
    <div v-for="(item,index) in dataList" :key="index">

    <h1>{{item.title}}</h1>
    <div class="text-dis">
      <el-image
      style="width: 100px; height: 100px"
      :src="item.url"
      fit="fill"></el-image>
      <p>{{item.text}}</p>
    </div>
    </div>
  </div>
</template>

<script>
export default {
  data(){
    return{
      dataList:[
        {
          title:'hellow',
          url:'',
          text:'dssa'
        }
      ]
    }
  },
  methods:{
    addBook(){
      this.$router.push('/bookAdd')
    },
    lookBook(){
      this.$router.push('/bookLook')
    }
  }
}
</script>

<style scoped>
.text-dis{
  display: flex;
}

</style>